﻿using System;
using System.Collections.Generic;
using System.Web.UI.WebControls;

public partial class WorkFlowDashBoard : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List<PurchaseOrderInfo> lst = new PurchaseOrderController().PurchaseOrders();
            grdWorkFlows.DataSource = lst;
            grdWorkFlows.DataBind();
        }
    }
    public void grdWorkFlows_RowCommand(object sender, CommandEventArgs e)
    {
        string workflowInstanceId = e.CommandArgument.ToString();
        if (e.CommandName.Equals("approve"))
        {
            // _controller.OpenDepartment(int.Parse(departmentId));
        }
        else if (e.CommandName.Equals("reject"))
        {
            //_controller.DeleteDepartment(int.Parse(departmentId));
        }
    }
    protected void btnPurchaseOrder_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/PurchaseOrder.aspx");
    }
    protected void btnRolValidation_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/RolValidation.aspx");
    }
    protected void btnOrderSent_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/OrderSent.aspx");
    }
}
